function[] = my_patch_for_stormi(X,Y,Data,error_rms,...
    selected_observatories, storm),


Data = log10(Data');
% mindata = min(nanmin(Data));
% maxdata = max(nanmax(Data));
% 
xx = [X(1)-(X(2)-X(1))/2 X(1:end-1)+diff(X)/2 X(end)+(X(end)-X(end-1))/2];
yy = [Y(1)-(Y(2)-Y(1))/2 Y(1:end-1)+diff(Y)/2 Y(end)+(Y(end)-Y(end-1))/2];
% 
C = flipud(colormap); % Reverses -> red for conductor and blue for resistor
% kk=1;
% for i = 1:length(X),
% for j = 1:length(Y),
%     if ~isnan(Data(i,j)),
%     Xpatch(kk,:) = [xx(i) xx(i+1) xx(i+1) xx(i)];
%     Ypatch(kk,:) = [yy(j) yy(j) yy(j+1) yy(j+1)];
%     cidx = floor(63*(Data(i,j)-mindata)/(maxdata-mindata)+1);
%     
%     if cidx > 64,
%         cidx = 64;
%     elseif cidx < 1,
%         cidx = 1;
%     end;
%     Cpatch(1,kk,:) = C(cidx,:);
%     kk=kk+1;
%     end;
% end;
% end;
% h=patch(Xpatch',Ypatch',Cpatch);
% caxis([mindata maxdata]);
% colorbar;

% 
% 
set(gca,'FontSize',16);

% if mod(length(Y),2)  & mod(length(X),2),
%     Dummy = [Data Data(:,end)];
%     Data = [Dummy;Dummy(end,:)];
% elseif mod(length(Y),2) & ~mod(length(X),2),
%     Data = [Data;Data(end,:)];
% elseif ~mod(length(Y),2) & mod(length(X),2),
%     Data = [Data Data(:,end)];
% end;

    Dummy = [Data Data(:,end)];
    Data = [Dummy;Dummy(end,:)];
 %Data = [Data Data(:,end)];
h=pcolor(Data);
set(gca,'Ytick',yy(2):yy(end));
set(gca,'YtickLabel',selected_observatories);
set(h,'Edgecolor','none');
for i = 1:size(storm,2),
    dates(i,:) = datestr(datenum(storm(i).year,storm(i).month,storm(i).day),'ddmmmyy');
end;
set(gca,'Xtick',xx(2):xx(end));
set(gca,'XtickLabel',dates);
for i = 1:length(X),
for j = 1:length(Y),
    if ~isnan(Data(j,i)),
  text(xx(i+1),yy(j+1),sprintf('%d',round(error_rms(i,j))));
  % text(X(i),Y(j),sprintf('%d',round(Data(i,j))));
    end;
end;
end;
for i = 1:size(storm,2),
    if i ==1,
        text(xx(i),yy(end)+1,sprintf('     Dst(nT) %4d',storm(i).dst),'FontSize',16);
    else,
        text(xx(i+1),yy(end)+1,sprintf('%3d',storm(i).dst),'FontSize',16);
    end;
end;
colormap(C);
colorbar('h');
more on;